<?php
require_once("checklogin.php");
require_once("classQuanTriTin.php");
$qt = new quantritin;


//Xóa 1 hình
if (isset($_GET['idDD'])==true){
	$idDD = $_GET['idDD']; 
	settype($idDD,"int");
	$qt->XoaDiaDanh($idDD);
	header("location:main.php?p=diadanh_list");
}

//Xóa nhiều tin
if (isset($_GET['listid'])==true){
$listid = explode(",",$_GET['listid']); 
for ($i=0 ; $i<count($listid) ; $i++){
	$idDD = $listid[$i]; 	
	$qt->XoaDiaDanh($idDD);
}
header("location:main.php?p=diadanh_list");
}
?>